function Vue(options) {
  this.$data = this._data = options.data
  observer(this.$data)
}

function observer(obj) {
  if (!obj || typeof obj !== 'object') return
  Object.keys(obj).forEach((key) => {
    var originValue = obj[key]
    Object.defineProperty(obj, key, {
      get() {
        return originValue
      },
      set(val) {
        originValue = val
      },
    })
  })
}
